package tmt.jrydt.mall

import android.content.Context
import android.os.Build
import android.webkit.WebView
import androidx.multidex.MultiDex
import io.flutter.app.FlutterApplication

/**
 * author: leiusual
 * create on: 2020/11/3
 * description:
 */
class MainApplication: FlutterApplication() {

  override fun attachBaseContext(base: Context?) {
    super.attachBaseContext(base)
    MultiDex.install(this)
  }

  override fun onCreate() {
    super.onCreate()
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
      if (packageName != getProcessName()) {
        WebView.setDataDirectorySuffix(getProcessName())
      }
    }
  }
}